home *** CD-ROM | disk | FTP | other *** search
/ MacWorld's Best Websites Sponsored by SpryNet / Macworld's Best Websites Sponsored by SpryNet.iso / System 7.5 Update 2.0 / CD Extras / DOS Compatibility 1.0.7 / APPLE_PC / INSTALL.BAT < prev    next >
Encoding:
DOS Batch File  |  1996-02-29  |  7.4 KB  |  298 lines  |  [TEXT/dosa]

  1. @echo off
  2. rem ------------------------------------------------------------------------
  3. rem    
  4. rem        File:        INSTALL.BAT
  5. rem    
  6. rem        Contains:    DOS Compatibility
  7. rem                    DOS-only installer script.
  8. rem    
  9. rem        Copyright:    (C) 1993-94 by Apple Computer, Inc.
  10. rem                    All Rights Reserved.
  11. rem    
  12. rem ------------------------------------------------------------------------
  13.  
  14.     rem    ---------------------------------
  15.     rem     Setup our variables
  16.     rem    ---------------------------------
  17.  
  18.     set srcPath=.\
  19.     set dstPath=C:\Apple
  20.     set aeFlag=0
  21.     set csFlag=0
  22.     set tmpPath=C:\Temp
  23.     set cfgsys=C:\Config.sys
  24.     set autoexec=C:\AutoExec.bat
  25.     set altPath=C:\ALT_CFGS
  26.  
  27. :StartupScreen
  28.     
  29.     rem    ---------------------------------
  30.     rem     Put up our copyright
  31.     rem    ---------------------------------
  32.     
  33.     cls
  34.     echo:
  35.     echo: Apple DOS Compatibility
  36.     echo: DOS-based Installer
  37.     echo: Copyright (C) 1994 Apple Computer, Inc.
  38.     echo:
  39.     
  40.     rem    ---------------------------------
  41.     rem     Check for lack of environment
  42.     rem        space
  43.     rem    ---------------------------------
  44.     
  45.     if not (%autoexec%)==() goto CheckDrive
  46.     
  47.     echo: Error: Out of Environment Space!!
  48.     echo: ---------------------------------
  49.     echo:
  50.     echo:    Increase the size of your environment using the 
  51.     echo:    '/E' switch on COMMAND.COM.
  52.     echo:        
  53.     echo:    Example CONFIG.SYS:
  54.     echo:
  55.     echo:    SHELL=C:\COMMAND.COM /E:512 /P
  56.     echo:
  57.     goto End
  58.  
  59. :CheckDrive
  60.  
  61.     rem    ---------------------------------
  62.     rem     Adjust the source path if
  63.     rem        we need to, then verify
  64.     rem        we've got a good directory
  65.     rem    ---------------------------------
  66.     
  67.     if exist %srcPath%GotWin.com goto CheckForWindows
  68.     set srcPath=A:\
  69.     if exist %srcPath%GotWin.com goto CheckForWindows
  70.     
  71.     echo: Error: Can't find files needed for installation
  72.     echo: -----------------------------------------------
  73.     echo:
  74.     echo: Check current drive/directory setting and
  75.     echo: disk availability.
  76.     echo:
  77.     goto End
  78.  
  79. :CheckForWindows
  80.  
  81.     rem    ---------------------------------
  82.     rem     If Windows is running, ask
  83.     rem        user to run the setup program
  84.     rem        instead
  85.     rem    ---------------------------------
  86.     
  87.     %srcPath%GotWin
  88.     if not errorlevel 1 goto ExplainInstall
  89.  
  90.     echo: Microsoft Windows is Running
  91.     echo: ----------------------------
  92.     echo: To install the DOS Compatibility files while
  93.     echo: Windows is running, use the Program Manager
  94.     echo: to run A:\SETUP.EXE from the floppy diskette.
  95.     goto End
  96.     
  97. :ExplainInstall
  98.  
  99.     rem    ---------------------------------
  100.     rem     Ask the user if they want
  101.     rem        to install
  102.     rem    ---------------------------------
  103.     
  104.     echo: This program will install into the directory "C:\Apple"
  105.     echo: only those files necessary for operation with DOS.
  106.     echo:
  107.     echo: If you will be running Microsoft Windows,
  108.     echo: please respond no to the question below,
  109.     echo: install Windows first, then run the program
  110.     echo: "A:\SETUP.EXE" from within the Windows Program Manager.
  111.     echo:
  112.  
  113. :PromptInstall
  114.     echo: Proceed with installation of DOS-only files? (Y/N)
  115.     
  116.     %srcPath%GetKey "YN" 0
  117.     if errorlevel 2 goto AbortInstall
  118.     if errorlevel 1 goto CopyFiles
  119.     goto PromptInstall
  120.  
  121. :CopyFiles
  122.     echo:
  123.     echo:
  124.  
  125.     rem    ---------------------------------
  126.     rem        Copy files to dst directory
  127.     rem    ---------------------------------
  128.     
  129.     mkdir %dstPath%>NUL
  130.     mkdir %altPath%>NUL
  131.     
  132.     echo: Copying DOSClip.exe    to %dstPath%\DOSClip.exe...
  133.     Copy /v          %srcPath%DOSClip.exe        %dstPath%>NUL
  134.     
  135.     echo: Copying MacShare.com    to %dstPath%\MacShare.com...
  136.     Copy /v          %srcPath%MacShare.com    %dstPath%>NUL
  137.     
  138.     echo: Copying CDROM.sys       to %dstPath%\CDROM.sys...
  139.     Copy /v          %srcPath%CDROM.sys        %dstPath%>NUL
  140.     
  141.     echo: Copying CONFIG.APL    to %altPath%\CONFIG.APL...
  142.     Copy /v          %srcPath%CONFIG.APL        %altPath%>NUL
  143.     
  144.     echo: Copying AUTOEXEC.APL  to %altPath%\CONFIG.APL...
  145.     Copy /v          %srcPath%AUTOEXEC.APL        %altPath%>NUL
  146.  
  147.     echo: Copying MACODI.COM   to %dstPath%\MACODI.COM...
  148.     Copy /v          %srcPath%MACODI.COM        %dstPath%>NUL
  149.  
  150.     echo: Copying README.NET   to %dstPath%\README.NET...
  151.     Copy /v          %srcPath%README.NET        %dstPath%>NUL
  152.  
  153. :ExplainConfig
  154.     
  155.     rem    ---------------------------------
  156.     rem        Adjust Config.sys
  157.     rem    ---------------------------------
  158.     
  159.     cls
  160.     echo: The installer can now update the Config.sys and
  161.     echo: AutoExec.bat files to allow use of the following
  162.     echo: features:
  163.     echo:
  164.     echo:    * Macintosh/PC folder sharing
  165.     echo:    * CDROM Drive
  166.     echo:    * Macintosh/DOS Copy & Paste
  167.     echo:
  168.     echo: If you choose not to update these files, you will
  169.     echo: need to make the changes manually before using the
  170.     echo: special features.
  171.     echo:
  172.  
  173. :PromptMacShare
  174.     
  175.     echo: Install Macintosh/PC folder sharing? (Y/N)
  176.     
  177.     %srcPath%GetKey "YN" 0
  178.     if errorlevel 2 goto PromptCDROM
  179.     if errorlevel 1 goto InstallMacShare
  180.     goto PromptMacShare
  181.     
  182. :InstallMacShare
  183.     
  184.     rem    ---------------------------------
  185.     rem        Install MacShare in AutoExec.bat
  186.     rem    ---------------------------------
  187.     
  188.     echo: Installing MacShare...
  189.     %srcPath%StripAdd %autoexec%    "MacShare"    "LH %dstPath%\MacShare" %aeFlag%
  190.     set aeFlag=1
  191.     
  192. :PromptCDROM
  193.     
  194.     echo: Install CDROM software? (Y/N)
  195.     
  196.     %srcPath%GetKey "YN" 0
  197.     if errorlevel 2 goto PromptDOSClip
  198.     if errorlevel 1 goto InstallCDROM
  199.     goto PromptCDROM
  200.     
  201. :InstallCDROM
  202.     
  203.     rem    ---------------------------------
  204.     rem        Install CDROM in Config.sys and AutoExec.bat
  205.     rem    ---------------------------------
  206.     
  207.     echo: Installing CDROM...
  208.     %srcPath%StripAdd %cfgsys%        "CDROM"        "DEVICE=%dstPath%\CDROM.SYS /D:CDDRVR" %csFlag%
  209.     %srcPath%StripAdd %autoexec%    "MSCDEX"    "LH C:\DOS\MSCDEX /D:CDDRVR /L:E" %aeFlag%
  210.     set aeFlag=1
  211.     set csFlag=1
  212.     
  213. :PromptDOSClip
  214.     
  215.     echo: Install Macintosh/DOS Copy & Paste? (Y/N)
  216.     
  217.     %srcPath%GetKey "YN" 0
  218.     if errorlevel 2 goto DoneConfig
  219.     if errorlevel 1 goto InstallDOSClip
  220.     goto PromptDOSClip
  221.     
  222. :InstallDOSClip
  223.     
  224.     rem    ---------------------------------
  225.     rem        Install DOSClip in AutoExec.bat
  226.     rem    ---------------------------------
  227.     
  228.     echo: Installing DOSClip...
  229.     %srcPath%StripAdd %autoexec%    "DOSClip"    "LH %dstPath%\DOSClip" %aeFlag%
  230.     set aeFlag=1
  231.     
  232.     if not (%tmp%)==() goto DoneConfig
  233.     
  234.     rem ---------------------------------
  235.     rem        Make a temp folder and assign
  236.     rem        tmp environment variable
  237.     rem ---------------------------------
  238.     
  239.     mkdir %tmpPath%>NUL
  240.     %srcPath%StripAdd %autoexec% "Tmp=" "set tmp=%tmpPath%" %aeFlag%
  241.     set aeFlag=1
  242.     echo:
  243.      
  244. :DoneConfig
  245.     
  246.     rem    ---------------------------------
  247.     rem        Tell 'em that configuration
  248.     rem        is complete
  249.     rem    ---------------------------------
  250.     
  251.     echo:
  252.     echo: Changes to Config.sys and AutoExec.bat are complete.
  253.     echo: The changes will not take effect until the PC is restarted.
  254.     
  255. :GoodInstall:
  256.  
  257.     rem    ---------------------------------
  258.     rem        Report that we're happy
  259.     rem    ---------------------------------
  260.     
  261.     echo:
  262.     echo: Installation Complete.
  263.     goto End
  264.     
  265. :AbortInstall:
  266.  
  267.     rem    ---------------------------------
  268.     rem        Report that we're sad
  269.     rem    ---------------------------------
  270.     
  271.     mkdir %dstPath%>NUL
  272.     
  273.     echo: Copying HW.INF        to %dstPath%\HW.INF...
  274.     Copy /v          %srcPath%HW.INF        %dstPath%>NUL
  275.     
  276.     echo: Copying WinSetup.bat    to C:\WinSetup.bat...
  277.     Copy /v          %srcPath%WINSETUP.BAT    C:\>NUL
  278.     
  279.     echo:
  280.     echo: Run the "WinSetup" batch file when you are ready to
  281.     echo: install Windows.
  282.     echo:
  283.     
  284. :End
  285.  
  286.     rem    ---------------------------------
  287.     rem        Cleanup our variables
  288.     rem    ---------------------------------
  289.     
  290.      set srcPath=
  291.     set dstPath=
  292.      set aeFlag=
  293.      set csFlag=
  294.     set tmpPath=
  295.     set cfgsys=
  296.     set autoexec=
  297.  
  298.